<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改成品')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-iteminfo-edit" th:object="${tIteminfo}">
        <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">单品号：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{itemNo}" class="form-control" type="text" readonly>
                </div>
            </div>
           <div class="form-group">
                <label class="col-sm-3 control-label">产品编号:</label>
                <div class="col-sm-8">
                    <select name="productInfoId" class="form-control m-b" th:with="type=${@productService.getProductInfo()}" disabled>
                        <option th:each="dict : ${type}" th:text="${dict.productNo}" th:value="${dict.id}" th:field="*{productInfoId}"></option>
                    </select>
                </div>
            </div>
           <div class="form-group">
                <label class="col-sm-3 control-label">产品名称：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{productName}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">EPC：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{epc}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">TID：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{tid}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">位置类别：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{locationType}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">经纬度值：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{longitudeLatitude}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">单据号：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{documentNo}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">创建时间：</label>
          <!--      <div class="col-sm-8">
                    <input name="productName" th:field="*{createTime}" class="form-control" type="text" readonly>
                </div>-->
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="createTime" th:value="${#dates.format(tIteminfo.createTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">操作人员：</label>
            <div class="col-sm-8">
                <input name="productName" th:field="*{createBy}" class="form-control" type="text" readonly>
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/iteminfo";
    $("#form-iteminfo-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-iteminfo-edit').serialize());
        }
    }
</script>
</body>
</html>